﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ep_question_check.aspx.cs"
    Inherits="ePioneer_ep_question_check" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="css/table.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="Javascript/jquery-1.4.2.src.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {

            $('#modify_cancel').click(function () {
                $('#hid_id').val('');
                $('#Modify_View').css("display", "none");
            });

            $('#btn_modify_submit').click(function () {
                var id = $('#hid_id').val();
                var tid = $('#ddl_type').val();
                $.post("ep_question.ashx?", { action: "ChangeType", id: id, tid: tid },
                   function (data) {
                       if (data == "1") {
                           alert("成功");
                           $('#Modify_View').css("display", "none");
                           window.location.href = window.location.href;
                       }
                       else {
                           alert("请重新再试");
                           $('#Modify_View').css("display", "none");
                       }
                   });
            })

        });

        function Check(id, type) {
            $.post("ep_question.ashx?", { action: "QuestionCheck", id: id, type: type },
                   function (data) {
                       if (data == "1") {
                           alert("审核成功")
                           window.location.href = window.location.href;
                       }
                       else {
                           alert("请重新再试");
                       }
                   });
        }


        function ChangeType(id) {
            document.location = "ep_question_edit.aspx?id=" + id;
        }

        function ff() {
            for (var i = 0; i < parseFloat(document.Form1.hidCount.value); i++) {

                var s1 = document.all("Repeater1:_ctl" + i + ":span_type").value; //document.Form1.Repeater1:_ctl0:tr1.value;

                //var tt3 = document.Form1.Repeater1:_ctl0:tr3.value;


                var tt = tt1 * tt2;
                document.all("Repeater1:_ctl" + i + ":tr3").value = tt;
                //alert(tt);
                //document.Form1.Repeater1:_ctl0:tr3.value = tt;
            }

        }


    </script>
</head>
<body>
    <form id="form1" runat="server">
    <asp:DropDownList ID="ddl_IsCheck" runat="server">
        <asp:ListItem Value="0">审核不通过</asp:ListItem>
        <asp:ListItem Value="1">通过</asp:ListItem>
    </asp:DropDownList>
    <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="查看" />
    <input id="Button2" type="button" value="添加" onclick="document.location='ep_question_edit.aspx'" /><br />
    <div>
        <table border="0" align="left" cellpadding="3" cellspacing="0" style="width:100%;
            border: 1px solid #337ABB;">
            <tr style="background: #337ABB;">
                <td>
                    标题
                </td>
                <td style="width: 40%">
                    内容
                </td>
                <td>
                    用户
                </td>
                <td>
                    是否结束
                </td>
                <td>
                    是否审核
                </td>
                <td>
                    类型
                </td>
                <td>
                    操作
                </td>
            </tr>
            <asp:Repeater ID="Repeater1" runat="server">
                <ItemTemplate>
                    <tr>
                        <td valign="top">
                            <%#Eval("Title")%>&nbsp;
                        </td>
                        <td valign="top">
                            <%#Eval("Detail")%>&nbsp;
                        </td>
                        <td>
                            <%#Eval("UserId")%>&nbsp;
                        </td>
                        <td>
                            <%#Eval("IsClose")%>&nbsp;
                        </td>
                        <td>
                            <%#Eval("IsCheck")%>&nbsp;
                        </td>
                        <td>
                            <%#GetEp_question_type(Eval("tid"))%>&nbsp;
                        </td>
                        <td>
                            <a href="javascript:void(0)" onclick="Check( <%#Eval("id")%>,1)">通过</a>&nbsp;<a href="javascript:void(0)"
                                onclick="Check( <%#Eval("id")%>,0)">不通过</a>&nbsp;<a href="javascript:void(0)" onclick="ChangeType(<%#Eval("id")%>)">修改</a>
                        </td>
                    </tr>
                </ItemTemplate>
            </asp:Repeater>
        </table>
        &nbsp;
    </div>
    <div id="Modify_View" style="display: none; position: absolute; z-index: 99; left: 346px;
        top: 50px; border: 5px solid #337ABB; background-color: #FFFFFF;">
        <table>
            <tr>
                <td>
                    <asp:DropDownList ID="ddl_type" runat="server">
                    </asp:DropDownList>
                    &nbsp;
                    <input type="button" id="btn_modify_submit" value="修改" />
                    &nbsp;<input type="button" id="modify_cancel" value="取消" />
                </td>
            </tr>
        </table>
    </div>
    </form>
    <input runat="server" type="text" id="hid_id" style="display: none" />
</body>
</html>
